import re

line = 'sdsg dsad; gdff, sdsd,   foo'
re.split(r'[;,\s]\s*', line)  # split分隔多个符号
fields = re.split(r'(;|,|\s)\s*', line)
print(fields)

values = fields[::2]
delimiters = fields[1::2] + ['']
print(values)
print(delimiters)
# 获取字符串
print(''.join(v+d for v, d in zip(values, delimiters)))
# 使用re 分隔
print(re.split(r'(?:,|;|\s)\s*', line))


if __name__ == '__main__':
    pass
